<!--{include(file='head.html')}-->
<div id="wrap">
	<!--{include('left.html')}-->
	<div id="maincont">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<div id="main_c">
			<form name="seaform" id="seaform" action="<!--{url('admin','item','index')}-->" method="post" onsubmit="$.oper.checkq('submit')">
				<div class="bt_bk">
					<span class="btn">
						<a href="javascript:void(0);" onclick="$.oper.refresh();return false;">刷新</a>
						<a href="javascript:void(0);" onclick="$.oper.remove();return false;">移除</a>
						<a href="javascript:void(0);" onclick="$.oper.delist();return false;">下架</a>
						<a href="<!--{url('admin','item','itemadd')}-->">添加</a>
						<a href="<!--{url('admin','item','index','type=zero')}-->">零库存</a>
					</span>
					<span class="search_bk">
						<input type="text" class="input_tx <!--{if !$q}-->hintinput<!--{/if}-->" name="q" id="q" value="<!--{def($q,'商品编号/商品名称')}-->" onfocus="$.oper.checkq('focus')" onblur="$.oper.checkq('blur')"/>
						<input type="button" value="搜索" class="input_bt" onclick="$.oper.seasubmit('sea')"/>
						<input type="button" value="导出" class="input_bt" onclick="$.oper.seasubmit('import')"/>
					</span>
					<span class="state_tip"></span>
				</div>
				<input type="hidden" value=""	name="do" id="do"/>
				<input type="hidden" value="1"	name="status" id="status"/>
				<input type="hidden" value="<!--{def($type,'zero')}-->"	id="type"/>
				<input type="hidden" value="<!--{def($pagearr['page'],1)}-->"		name="page" id="page"/>
				<input type="hidden" value="<!--{def($pagearr['pagesize'],10)}-->"	name="pagesize" id="pagesize" />
			</form>
			<!--{include_page("page.html","top")}-->
			<table class="tableStyle" border="0" cellspacing="0" cellpadding="0">
				<thead>
					<tr align="center">
						<th width="5%">
							<input type="checkbox" value="1" name="allselect" id="allselect" autocomplete="off" onclick="$.oper.selectall()"/>
						</th>
						<th width="10%">操作</th>
						<th width="10%">
							<!--{if $orderby == 'bn'}-->
								<a href="<!--{url('admin','item','index','orderby=bn&order=$orderrev')}-->" class="<!--{$order}-->">货号</a>
							<!--{else}-->
								<a href="<!--{url('admin','item','index','orderby=bn&order=desc')}-->">货号</a>
							<!--{/if}-->
						</th>
						<th width="35%" colspan="2">
							<!--{if $orderby == 'itemid'}-->
								<a href="<!--{url('admin','item','index','orderby=itemid&order=$orderrev')}-->" class="<!--{$order}-->">商品</a>
							<!--{else}-->
								<a href="<!--{url('admin','item','index','orderby=itemid&order=desc')}-->">商品</a>
							<!--{/if}-->
						</th>
						<th width="10%">
							<!--{if $orderby == 'price'}-->
								<a href="<!--{url('admin','item','index','orderby=price&order=$orderrev')}-->" class="<!--{$order}-->">价格</a>
							<!--{else}-->
								<a href="<!--{url('admin','item','index','orderby=price&order=desc')}-->">价格</a>
							<!--{/if}-->
						</th>
						<th width="10%">
							<!--{if $orderby == 'order'}-->
								<a href="<!--{url('admin','item','index','orderby=order&order=$orderrev')}-->" class="<!--{$order}-->">排序</a>
							<!--{else}-->
								<a href="<!--{url('admin','item','index','orderby=order&order=desc')}-->">排序</a>
							<!--{/if}-->
						</th>
						<th width="10%">
							<!--{if $orderby == 'inventory'}-->
								<a href="<!--{url('admin','item','index','orderby=inventory&order=$orderrev')}-->" class="<!--{$order}-->">库存</a>
							<!--{else}-->
								<a href="<!--{url('admin','item','index','orderby=inventory&order=desc')}-->">库存</a>
							<!--{/if}-->
						</th>
						<th width="10%">
							<!--{if $orderby == 'volume'}-->
								<a href="<!--{url('admin','item','index','orderby=volume&order=$orderrev')}-->" class="<!--{$order}-->">销量</a>
							<!--{else}-->
								<a href="<!--{url('admin','item','index','orderby=volume&order=desc')}-->">销量</a>
							<!--{/if}-->
						</th>
					</tr>
				</thead>
				<tbody id="listtbody">
					<!--{foreach $items item}-->
					<tr align="center" id="tr_<!--{$item.itemid}-->">
						<td><input type="checkbox" value="<!--{$item.itemid}-->" name="singleselect" autocomplete="off"/></td>
						<td nowrap>
							<!--{if $item[outer]=='taobao'}-->
							<a href="http://item.taobao.com/item.htm?id=<!--{$item[outerid]}-->" class="taobao"	title="访问淘宝" target="_blank"></a>
							<!--{/if}-->
							<a href="<!--{url('admin','item','itemedit','itemid=$item.itemid')}-->" class="edit"	title="编辑"></a>
							<a href="javascript:void(0);" onclick="$.oper.remove('<!--{$item.itemid}-->');return false;" class="remove"  title="移除"></a>
							<a href="javascript:void(0);" onclick="$.oper.delist('<!--{$item.itemid}-->');return false;" class="sale"	title="下架"></a>
						</td>
						<td><!--{$item.bn}--></td>
						<td width="5%" align="left">
							<a href="<!--{url('index','item','index','itemid=$item[itemid]')}-->" target="_blank">
								<img src = "<!--{$item.itemimg}-->_50x50.jpg" width="50" height="50" onerror="this.onerror='',this.src='images/nopicture.jpg'" class="mid"/>
							</a>
						</td>
						<td width="30%" align="left">
							<span onclick="$.oper.edit(this,'itemname','<!--{$item.itemid}-->')" title="点击修改商品名称" onmouseover="$.oper.bgcolor(this,'on')" onmouseout="$.oper.bgcolor(this,'off')"><!--{$item.itemname}--></span>
						</td>
						<td><!--{getPrice($item.price)}--></td>
						<td>
							<span onclick="$.oper.edit(this,'order','<!--{$item.itemid}-->')" title="点击修改排序" onmouseover="$.oper.bgcolor(this,'on')" onmouseout="$.oper.bgcolor(this,'off')"><!--{$item.order}--></span>
						</td>
						<td><!--{$item.inventory}--></td>
						<td><!--{$item.volume}--></td>
					</tr>
					<!--{/foreach}-->
				</tbody>
			</table>
			<!--{include_page("page.html","foot")}-->
		</div>
		<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
	</div>
</div>
<!--{include(file='foot.html')}-->
<script type="text/javascript">
$(function(){
	$.oper.init("<!--{url('admin','item','itemsave')}-->").setdefq('商品编号/商品名称');
});
</script>